<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String path = request.getContextPath();//获取项目名称
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";//完整的项目路径
%>
<base href="<%=basePath%>">
<html>
<body><div align="center">
    <form action="dosome" method="post">
        姓名: <input type="text" name="name"><br>
        年龄:<input type="text" name="age"><br>
        <input type="submit" value="提交">
    </form>

</div>
</body>
</html>
